package designpattern.strategy.practice;

/**
 * TODO:类描述
 *
 * @className: DiscountStrategy
 * @packageName: designpattern.strategy.practice
 * @author: Zhuhj
 * @version: V1.0
 * @date: 2021/4/18 18:59
 */
public class DiscountStrategy implements IPriceStrategy{
    @Override
    public double compute(double originPrice) {
        double retPrice =0 ;
        if(originPrice >= 200){
            System.out.println("满200 打8折");
            retPrice = originPrice * 0.8;
        }else{
            System.out.println("不够200 不能打折");
            retPrice = originPrice;
        }
        return retPrice;
    }
}
